package cn.jesin.ssmss01.vo.responseformat;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author 谷汉斌
 * @description 响应结果
 * @createTime 2024/7/22 下午2:40
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "统一返回形式")
public class Result<T> {
    /**
     * 响应是否成功标志
     */
    @Schema(description = "响应是否成功标志")
    private boolean flag;
    /**
     * 返回操作码
     */
    @Schema(description = "返回的操作码")
    private Integer code;
    /**
     * 返回操作信息
     */
    @Schema(description = "返回的操作信息")
    private String message;
    /**
     * 返回数据
     */
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @Schema(description = "返回的数据")
    private T data;
}
